<template>
<div class="center food_category_wrap clearfix">
    <div class="food_category_list" v-for="(item,index) in foodCategoryList" :key="index" v-if="item.show">
        <a :href="item.href">
        <img :src="item.src" alt="">
        <span class="food_cate_name">{{ item.name }}</span>
    </a>
    </div>
</div>
</template>

<script>
export default {
    props: ['foodCategoryList'],
    data() {
        return {

        }

    },
    components: {

    }
}
</script>

<style lang="scss">
.food_category_wrap {
    display: flex;
    flex-flow: row wrap;
    padding-top: 0.5rem;
    padding-bottom: 0.44rem;
    &:after {
        content: "";
        flex: auto;
    }
    .food_category_list {
        width: 1.25rem;
        margin-right: 0.5rem;
        margin-bottom: 0.2rem;
        &:nth-of-type(4n) {
            margin-right: 0;
        }
        a{
            display: block;
        }
        img {
            width: 99%;
        }

        .food_cate_name {
            display: block;
            margin-top: 0.1rem;
            font-size: 0.22rem;
            font-weight: bold;
            font-family: "华文新魏";
        }

    }
}
</style>
